package cn.yyx.orderservice.mapper;

import cn.yyx.orderservice.entity.Order;
import cn.yyx.orderservice.entity.OrderPageVo;
import cn.yyx.orderservice.entity.OrderQueryPageParam;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author sun
 * @since 2023-10-25
 */
public interface OrderMapper extends BaseMapper<Order> {

    /**
     * 分页查询代码
     * @param page 传入page对象，就不用自己写分页了，会自动给你分页
     * @param param 表示查询条件
     * @return
     */
    List<OrderPageVo> listOrder(Page<OrderPageVo> page, @Param("param") OrderQueryPageParam param);
}
